home *** CD-ROM | disk | FTP | other *** search
- to clock :seconds
- cs
- ht
- drawface
- make "sec 0
- make "min 0
- make "hour 0
- plottimehour :hour
- plottimemin :min
- plottimesec :sec
- repeat :seconds ~
- [ ~
- make "thetime gettime ~
- make "nhour first :thetime ~
- make "thetime butfirst :thetime ~
- make "nmin first :thetime ~
- make "thetime butfirst :thetime ~
- make "nsec first :thetime ~
- plottimesec :sec ~
- if not equalp :min :nmin~
- [~
- plottimemin :min ~
- if not equalp :hour :nhour~
- [~
- plottimehour :hour ~
- plottimehour :nhour ~
- ]~
- plottimemin :nmin ~
- ]~
- plottimesec :nsec ~
- make "hour :nhour~
- make "min :nmin~
- make "sec :nsec~
- ]
- end
-
- to drawface
- setheading 30
- pu
- repeat 12 ~
- [~
- fd 120 ~
- setx xcor-12 ~
- sety ycor+12 ~
- label repcount ~
- setx xcor+12 ~
- sety ycor-12 ~
- bk 120 ~
- rt 30 ~
- ]
- end
-
- to gettime
- make "thetime parse time
- make "thetime butfirst :thetime
- make "thetime butfirst :thetime
- make "thetime butfirst :thetime
- make "thetime first :thetime
- make "thetime parse map "oo :thetime
- output :thetime
- end
-
- to oo :a
- if equalp ": :a [output char 32] [output :a]
- end
-
- to plottimehour :hour
- penreverse
- setpensize [5 5]
- setheading :hour*30
- pd
- fd 50
- pu
- bk 50
- end
-
- to plottimemin :min
- penreverse
- setpensize [2 2]
- setheading :min*6
- pd
- fd 100
- pu
- bk 100
- end
-
- to plottimesec :sec
- penreverse
- setpensize [1 1]
- setheading :sec*6
- pd
- fd 100
- pu
- bk 100
- end
-